<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['环卫管理','异常信息','异常记录']" icon="fa fa-cube" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>

	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>异常记录</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module">
									<span class="module_text">区域名称</span>
									<select name="" id="" class="module_inp" [(ngModel)]="areaName" style="width: 120px;" (change)='getStationByArea()'>
										<option value="">全部</option>
										<option *ngFor="let item of allAreaList" [attr.value]='item.areaName'>{{item.areaName}}</option>
									</select>
								</div>
								
								<div class="top_module">
									<span class="module_text">站点名称</span>
									<select name="" id="" class="module_inp" [(ngModel)]="siteName" style="width: 120px;">
										<option value="">全部</option>
										<option *ngFor="let item of allStationList" [attr.value]='item.stationName'>{{item.stationName}}</option>
									</select>
								</div>
								
								<sa-company-tree-car companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree-car>
								
								<div class="selectDate top_module">
									<table-select-date [notInit]='true'    (outerTime)="getSelectTableTime($event)" ></table-select-date>
								</div>
								<button type="button" class="btn btn-primary" (click)="search_data()">查询</button>

							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>车牌号码</th>
										<th>时间</th>
										<th>异常信息</th>
										<th>司机</th>
										<th>站点名称</th>
										<th>区域名称</th>
										<th>地址</th>
										<th>图片</th>
										<th>备注</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData; let i = index" [attr.data-index]="i"  >
										<td>{{row.carNumber}}</td>
										<td>{{row.uploadTime}}</td>
										<td>{{row.message}}</td>
										<td>{{row.driver}}</td>
										<td>{{row.stationName}}</td>
										<td>{{row.areaName}}</td>
										<td>{{row.address}}</td>
										<td>
											<button type="button" (click)="lookImage(row.imagePath);myModal.show()">查看</button>
										</td>
										<td>{{row.remark}}</td>
										<td>
											<button type="button" (click)="dele_row(row.id)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator 
								[totalRecords]="totalCount" 
								[rows]="pageSize" 
								[currentPage]="curPage - 1" 
								(onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
	<!-- 模态框（Modal） -->
	
	<div bsModal #myModal="bs-modal" id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="myModal.hide()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">异常图片</h4>
				</div>
				<div class="modal-body">
					<img [attr.src]="imgSrc" alt="记录图片" />
				</div>
			</div>
		</div>
	</div>
</div>